<template>
  <div>
    <div class="bos">
      <div class="biaoT">
        <img src="@/assets/imgSrc/biaoTou.png" alt="" />
        <div class="biaoTZT">任务中心</div>
      </div>
      <!-- 上 -->
      <div class="fangK">
        <div class="box">
          <a-badge count="5">
            <div class="boa" @click="taskDoorTask">
              <span>{{ form.handleNumber }}</span>
              <span>任务代办</span>
            </div>
          </a-badge>
        </div>
        <div class="box">
          <a-badge count="">
            <div class="boa" @click="taskDoorTask">
              <span>{{ form.overdueNumber }}</span>
              <span>任务超期</span>
            </div>
          </a-badge>
        </div>
        <div class="box">
          <a-badge count="" @click="taskDoorTask">
            <div class="boa" style="background: #8050EB;">
              <span>{{ form.finalNumber }}</span>
              <span>任务已办</span>
            </div>
          </a-badge>
        </div>
        <div class="box">
          <a-badge count="" @click="taskDoorTask">
            <div class="boa">
              <span>{{ form.likeNumber }}</span>
              <span>我的关注</span>
            </div>
          </a-badge>
        </div>
      </div>
      <!-- 上中 -->
      <div>
        <div class="hr"></div>
      </div>
      <!-- 下中 -->
      <div class="calendarComponent">
        <calendar></calendar>
      </div>
      <!-- 下 -->
      <div class="bottomCenter">
        <div><span>*</span> &nbsp <span>您可以选择日期添加任务</span></div>
        <div class="btn" @click="addRen">添加任务</div>
      </div>
    </div>
  </div>
</template>

<script>
import calendar from './components/calendar.vue'
import { defineComponent } from 'vue';
export default {
  name: 'TransitLeftCenter',
  components: {
    calendar
  },
  data() {
    return {
      form: {}
    }
  },

  mounted() {
    this.init()
  },

  methods: {
    init() {
      this.$api.GET('/modules/doorTask/count').then(res => {
        console.log('任务中心', res);
        this.form = res.data
      })
    },
    taskDoorTask() {
      this.$router.push('/task/doorTask/doorTask')
    },
    addRen() {
      console.log(111);
      this.$router.push('/task/doorCalendarTasks')
    }
  }
}
</script>

<style lang="less" scoped>
.ant-dropdown-link {
  font-size: 14px;
  // padding-left: 15px;
  // margin-top: -10px;
}

.bos {
  margin: 20px 0 20px 0px;
  border: 2px solid #0044ff;
  border-radius: 10px;
  padding: 0px 0 14px 0;
  box-shadow: inset 0px 0px 10px 34px rgba(3, 9, 90, 60%);
  position: relative;
}

.fangK {
  display: flex;
  justify-content: space-around;
  padding: 5px 0;

  .box {

    .boa {
      background-color: #1181E7;
      border-radius: 5px;
      display: flex;
      flex-direction: column;
      justify-content: center;
      text-align: center;
      color: #fff;
      padding: 10px;

      span:nth-child(1) {
        font-weight: 600;
        font-size: 23px;
      }

      span:nth-child(2) {
        padding-top: 8px;
        font-size: 11px;
      }
    }
  }
}

::v-deep(.ant-scroll-number) {
  direction: ltr;
  overflow: hidden;
  margin: 0px 15px 0 0;
}

.biaoT {
  // width: 100%;
  text-align: center;
  position: relative;
  top: -5px;
  height: 70px;

  img {
    width: 300px;
  }

  .biaoTZT {
    color: #fff;
    position: relative;
    top: -62px;
    font-size: 21px;
    font-weight: 600;
  }
}

.hr {
  height: 2px;
  background-color: #092E5A;
  margin: 25px 20px;
}

.bottomCenter {
  color: #fff;
  padding: 10px 15px 0px 15px;
  font-size: 14px;

  .btn {
    background-color: #02D6F4;
    width: 100%;
    text-align: center;
    padding: 8px 0;
    border-radius: 5px;
    margin-top: 10px;
    color: #000;
    font-weight: 600;
  }
}

.calendarComponent {
  padding: 0px 20px;
}
</style>